home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
jazclib1.arc
/
JZGETATR.C
< prev
next >
Wrap
Text File
|
1986-04-06
|
853b
|
27 lines
/*
┌────────────────────────────────────────────────────────────────────────────┐
│jzgetatr.c │
│Return a files directory attribute. (hidden, system etc) │
│Usage: attribute = jzgetatr("cl.exe"); │
│ │
│ (C) JazSoft Software by Jack A. Zucker (301) 794-5950 │
└────────────────────────────────────────────────────────────────────────────┘
*/
jzgetatr(fstr)
char *fstr;
{
union REGS sreg,dreg;
struct SREGS seg;
segread(&seg);
sreg.x.ax = 0x4300; /* get file attribute */
sreg.x.dx = (int) fstr;
intdosx(&sreg,&dreg,&seg);
if (dreg.x.cflag & 1 == 1) return(-1);
else return(dreg.x.cx);
}